// File:       autodstry.c++
// Version:    1.00
// Author:     (c) Miles Sabin, 1997
// Purpose:    destroy auto objects during stack unwinding

// Change log:
//  15/01/97   v. 1.00
//  28/01/97   Removed destructor.
//  16/02/97   Removed dependency on __current_context.
//  21/02/97   Renamed from exatdstry.

#include "exception.h"


// Implementation of AutoDestroyer<T>

template<class T>
AutoDestroyer<T>::AutoDestroyer(T& target)
  : target_(target)
  {}

template<class T>
void AutoDestroyer<T>::destroy() const
  { ::destroy(&target_); }
